<%@ include file="../../common/taglibs.jsp"%>

<script language="JavaScript" type="text/javascript">
        function selectDropDown(optionSelected){
            if(optionSelected != ""){
                document.actionItemsForm.countyId.value=optionSelected;
                document.actionItemsForm.submit();
            }
        }
</script>        
<title><fmt:message key="action.title"/></title>
<form:form name="actionItemsForm" commandName="actionItemsForm" method="post" action="actionitemsform.html" onsubmit="return onFormSubmit(this)" id="actionItemsForm">
<table border="0" width="100%">
<tr>
<tr>
    <td>
        <label for="county"><b><fmt:message key="county.lookup"/>:&nbsp;</b></label>
        <authz:authorize ifAnyGranted="ROLE_ADMIN">
            <form:select id="countyId" path="countyId" onchange="selectDropDown(this.options[this.selectedIndex].value);">
                <form:options items="${countyList}" itemLabel="value" itemValue="id"/>
            </form:select>
        </authz:authorize>
    </td>
 </tr>
 </table>
</form:form>
<hr class="hrGray"/>
<!-- Unverified Complaint section -->
<fieldset>
<legend><fmt:message key="complaint.pending"/></legend>
<label><fmt:message key="complaint.unverified"/></label>
<display:table name="complaintList" class="table" requestURI="" id="complaintList" export="true">
    <display:column titleKey="complaint.id" sortable="true" media="html" autolink="true">
        <c:url value="associateComplaint1.html" var="associatorURL">
        <c:param name="complaintId" value="${complaintList.id}"/>
        <c:param name="_target0" value="Next"/>
        <c:param name="tab" value="pendingComplaints"/>
        </c:url>
        <a href='<c:out value="${associatorURL}"/>'><c:out value="${complaintList.id}"/>
    </display:column>    
    <display:column property="complaintDate" titleKey="complaint.date" format="{0,date,MM/dd/yyyy}" sortable="true"/>
    <display:column property="initialComplaint.businessName" titleKey="business.name" sortable="true" escapeXml="false"/>
    <display:column property="initialComplaint.address.address1" titleKey="business.address" sortable="true" escapeXml="false"/>
    <display:column property="initialComplaint.address.city" titleKey="business.city" sortable="true" escapeXml="false"/>
    <display:column property="initialComplaint.address.postalCode" titleKey="business.zip" sortable="true"/>
</display:table>
</fieldset>    
<hr class="hrGray"/>
